import { createBrowserRouter } from 'react-router-dom'
import Home from '@/views/Home'
import App from '@/views/App'
import AppDetail from '@/views/App/AppDetail'
import Layout from '@/views/Layout'

const router = createBrowserRouter([
  {
    path: '/',
    element: <Layout />,
    children: [
      {
        path: '/',
        element: <Home />,
      },
      {
        path: '/app',
        element: <App />,
      },
    ],
  },
  {
    path: '/app/:id',
    element: <AppDetail />,
  },
])
export default router
